<?php defined('DML') or die("Access locked");

$conf = new Config;
$mysql = new MySQL($conf->dbhost, $conf->dbuser, $conf->dbpassw, $conf->db, $tpl);

require PATH.DS.'includes'.DS.'snippets'.DS.'users.php';
require PATH.DS.'modules'.DS.'modUsers'.DS.'editUsersClass.php';

define('CSS', BASEHREF.'tamplates/'.$conf->tamplate.'/');

$tpl['main'] = PATH.DS.'tamplates'.DS.$conf->tamplate.DS.'index.tpl';
$tpl['adduser'] = PATH.DS.'tamplates'.DS.$conf->tamplate.DS.'adduser.tpl';
$tpl['archiv'] = PATH.DS.'tamplates'.DS.$conf->tamplate.DS.'archiv.tpl';

$data['title'] = "Пользователи - ".$conf->title;

if(isset($_GET['act'])){
   $user = new EditUsers($_GET['act'], $_POST);
}

$data = @array_merge($data, $user->res);

$data['user'] = $mysql->SelectUser();
$data['content'] = ParseTamplatePath($data, $tpl['adduser']);
$mysql->ArchiveNotes();
$data['archiv'] = $mysql->ParseTemplate('archiv');

$html = ParseTamplatePath($data, $tpl['main']);
echo $html;
echo "Запросов к базе ".$mysql->total_queries."<br />";
?>
